
#ifndef THREAD_H_
#define THREAD_H_

#include <pthread.h>

class Thread {
public:
	Thread();
	void iniciar();
	virtual ~Thread();
	void esperarEjecucion();
protected:
	virtual void ejecutar() = 0;
private:
	pthread_t thread_id;
	static void* funcionAEjecutar(void* arg){
		Thread* thread = (Thread*) arg;
		thread->ejecutar();
		return 0;
	}
};

#endif /* THREAD_H_ */
